$(document).ready(function() {
	$(".delAnnounce").click(function() {
		if (confirm("確定刪除此公告?")) {
			var id = $(this).attr("id").split("-")[1];
			
			$.ajax({
				url: "./delAnnounce",
				type: "POST",
				data: {
					annId: id
				},
				async: false,
				success: function() {
					alert("刪除成功");
					$(location).attr("href", "./editAnnounce");
				}
			});
		}
	});
});